<style type="text/css">
<!--
#satir{
	border-style:solid;
	border: 0;
	border-bottom:1px solid #000000;
}
.radyobuton{
/*	width:30px;
	height: 30px;*/
}
.icerikStyle{
	color:#FFFFFF;
	padding:10px;
	/*width:700px;
	height:400px;*/
    background: #555555;
    -moz-border-radius: 15px;
	border-radius: 15px;	
	z-index:200;

}

#fuzz{ 
	position:absolute; 
	top:0; 
	left:0; 
	width:100%; 
	z-index:100; 
	/*background: url('/images/fuzz.gif'); */
	background-color: #000000;
	display:none; 
	text-align:left; 
	filter: alpha(opacity = 55);
    opacity:.55;
}  
  
-->
</style>
<script type='text/javascript' src='http://bye.anadolu.edu.tr/js/flashobject.js'></script>
<script type='text/javascript' src='/lib/jwplayer/jwplayer.js'></script>

<script>
var videoHtmlArray=new Array();
var animHtmlArray=new Array();
var resimHtmlArray=new Array();
var resimlemeHtmlArray=new Array();
var sesHtmlArray=new Array();
$(document).ready(function(){
	$("#icerik").hide();
	//$("#icerik").position().left = "300px";//window.innerWidth; 
	$("#fuzz").css("height", $(document).height());  
	 
});
$(window).bind("resize", function(){  
   $("#fuzz").css("height", $(window).height());  
});
function videoKapat(){
	$("#icerik").html("");
	$("#icerik").hide();
	$("#fuzz").fadeOut();
}
function videoGoster(videoHtml){
	sol = $(window).width()/2 - 330;
	ust = $(window).scrollTop() + 20;
	$("#icerik").css("left",sol+"px");
	$("#icerik").css("top",ust+"px");
	$("#icerik").show();
	$("#icerik").html(videoHtml);
	$("#fuzz").fadeIn();  
}
function resimGoster(resimHtml){
	sol = $(window).width()/2 - 330;
	ust = $(window).scrollTop() + 20;
	$("#icerik").css("left",sol+"px");
	$("#icerik").css("top",ust+"px");
	$("#icerik").show();
	$("#icerik").html(resimHtml);
}

function mp3Cal(id){
	$("#"+id)[0].play();
}
</script>
 <div id="fuzz"></div>
<div id="icerik" class="icerikStyle" style="position:absolute; top:20px;"></div>
<h3>
<?php echo Araclar::yaz("Beceri Detayları","Skill Details"); ?>
</h3>
<p>
<?php
$beceri_id = $id;
$m = Beceriler::model()->findByPk($id);
	echo "<br>";
	echo "<table><tr><td>";
	echo "<b>".Araclar::yaz($m->beceri_adi,$m->beceri_adi_en).Araclar::yaz(" Becerisi"," ")."</b>";
	echo "</td>";
	$videoHtmlTum = $this->videoHtmlUret($id,0,'video');
	$animHtmlTum  = $this->resimHtmlUret($id,0,'anim',0);
	echo "<script>";
	echo "\nvideoHtmlTum=\"$videoHtmlTum\";\n";
	echo "\nanimHtmlTum=\"$animHtmlTum\";\n";
	echo "</script>";
	if(!empty($videoHtmlTum)){
		echo "<td align='center'>";
		echo "<img src='".Yii::app()->request->baseUrl."/images/cokluortam_video.png' onClick=\"videoGoster(videoHtmlTum)\" style='cursor:pointer' />";
		echo "<br /><font size=3>";
		echo Araclar::yaz("(Tüm beceri için)","(Includes all steps)");
		echo "</font>";
		echo "</td>";
	}
	if(!empty($animHtmlTum)){
		echo "<td align='center'>";
		echo "<img src='".Yii::app()->request->baseUrl."/images/cokluortam_canlandirma.png' onClick=\"videoGoster(animHtmlTum)\"  style='cursor:pointer' />";
		echo "<br /><font size=3>";
		echo Araclar::yaz("(Tüm beceri için)","(Includes all steps)");
		echo "</font>";
		echo "</td>";
	}
	//Araclar::trace($animHtmlTum);
	echo "</tr></table>";	
//echo $m->beceri_adi." Becerisi";
?>
</p>
<?php


	echo "<br>";
	
	$komut = Yii::app()->db->createCommand("SELECT bb.id, bb.basamak_metni, bb.basamak_metni_en FROM {{beceriler}} b, {{beceri_basamaklari}} bb WHERE b.id = bb.beceri_id AND b.id=:id ORDER BY sira");
	$komut->bindParam(":id",$id);
	$rows = $komut->queryAll();
?>
<table cellpadding="0" cellspacing="0" width="100%">
	<tr>
		<td colspan="2">&nbsp;</td>
		<td colspan="5" align="center"><div style="font-size:12pt;"><?php echo Araclar::yaz("Çokluortamlar", "Multimedia"); ?></div>
	</tr>
  </tr>
	<?php 
	$js_betik ="";
	$say_video=0;
	$say_anim=0;
	$say_resim=0;
	$say_resimleme=0;
	$say_ses=0;
	for($i=0;$i<count($rows);$i++){
		$videoHtml		= $this->videoHtmlUret($beceri_id,$rows[$i]["id"],'video',$say_video);
		$animHtml		= $this->resimHtmlUret($rows[$i]["id"],$say_anim,'anim');
		$resimHtml		= $this->resimHtmlUret($rows[$i]["id"],$say_resim,"resim");
		$resimlemeHtml	= $this->resimHtmlUret($rows[$i]["id"],$say_resimleme,"resimleme");
		//$sesHtml		= $this->sesHtmlUret($rows[$i]["id"],$say_ses);
		
		$model_bb = BeceriBasamaklari::model()->findByPk($rows[$i]["id"]);
		$ses_url=$model_bb->ses_url;
		$sesTag="";
		if($ses_url!=""){
			if(substr($ses_url, 0, 4)!="http"){
				$ses_url = "http://bye.anadolu.edu.tr/cokluortam/$model_bb->beceri_id/ses/$ses_url";
			}
			$sesTag = "<audio id='mp3$model_bb->id' name='mp3$model_bb->id' src='$ses_url'></audio>";
		}
		//Araclar::trace($resimlemeHtml);
		if(!empty($videoHtml)) $js_betik .= "\nvideoHtmlArray[".($say_video++)."]=\"$videoHtml\";\n";
		if(!empty($animHtml)) $js_betik .= "\nanimHtmlArray[".($say_anim++)."]=\"$animHtml\";\n";
		if(!empty($resimHtml)) $js_betik .= "\nresimHtmlArray[".($say_resim++)."]=\"$resimHtml\";\n";
		if(!empty($resimlemeHtml)) $js_betik .= "\nresimlemeHtmlArray[".($say_resimleme++)."]=\"$resimlemeHtml\";\n";
		//if(!empty($sesHtml)) $js_betik .= "\nsesHtmlArray[".($say_ses++)."]=\"$sesHtml\";\n";

		echo "<tr >";
		echo "<td id=\"beyaz_sol\">".($i+1)."</td>";
		echo "<td id=\"beyaz_orta\">";
		echo Araclar::yaz($rows[$i]["basamak_metni"],$rows[$i]["basamak_metni_en"]);
		echo "</td>";
		if($videoHtml!=""){
			echo "<td style='padding:0px;border-spacing:0px' id=\"beyaz_orta\" width='48px'>";
			echo "<img src='/images/cokluortam_video.png' onClick=\"videoGoster(videoHtmlArray[".($say_video-1)."])\"  style='cursor:pointer' />";
		}else{
			echo "<td style='padding:0px;border-spacing:0px' id=\"beyaz_orta\" width='0'>";
		}
		echo "</td>";	
		if($animHtml!=""){
			echo "<td style='padding:0px;border-spacing:0px' id=\"beyaz_orta\" width='48px'>";
			echo "<img src='/images/cokluortam_canlandirma.png'  onClick=\"videoGoster(animHtmlArray[".($say_anim-1)."])\"  style='cursor:pointer' />";
		}else{
			echo "<td style='padding:0px;border-spacing:0px' id=\"beyaz_orta\" width='0'>";
		}
		echo "</td>";	
		if($resimHtml!=""){
			echo "<td style='padding:0px;border-spacing:0px' id=\"beyaz_orta\" width='48px'>";
			echo "<img src='/images/cokluortam_fotograf.png' onClick=\"videoGoster(resimHtmlArray[".($say_resim-1)."])\"  style='cursor:pointer' />";
		}else{
			echo "<td style='padding:0px;border-spacing:0px' id=\"beyaz_orta\" width='0'>";
		}
		echo "</td>";	
		if($resimlemeHtml!=""){
			echo "<td style='padding:0px;border-spacing:0px' id=\"beyaz_orta\" width='48px'>";
			echo "<img src='/images/cokluortam_resimleme.png' onClick=\"videoGoster(resimlemeHtmlArray[".($say_resimleme-1)."])\"  style='cursor:pointer' />";
		}else{
			echo "<td style='padding:0px;border-spacing:0px' id=\"beyaz_orta\" width='0'>";
		}
		echo "</td>";	
		if($ses_url!=""){
			echo "<td style='padding:0px;border-spacing:0px' id=\"beyaz_orta\" width='48px'>";
			//echo "<img src='/images/cokluortam_seslendirme.png'  onClick=\"videoGoster(sesHtmlArray[".($say_ses-1)."])\" />";
			echo "<img src='/images/cokluortam_seslendirme.png'  onClick=\"mp3Cal('mp3$model_bb->id')\"  style='cursor:pointer' />";
			echo $sesTag;
		}else{
			echo "<td style='padding:0px;border-spacing:0px' id=\"beyaz_orta\" width='0'>";
		}
		echo "</td>";	
		echo "<td id=\"beyaz_sag\" width='2px'></td>";
		echo "</tr>";
		echo "<tr height='3px'><td></td></tr>";
	}
	echo "</table>";
	echo "<br />";
	$this->renderPartial("_cokluortam_aciklama"); 
	echo CHtml::endForm();

	echo "<script>";
	echo $js_betik;
	echo "</script>";

	

?>
<?php
echo Araclar::sayfaAltiButonlari("", "beceri/tespit", "");
?>